3.1.59 \(\int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx\) [59]

3.1.59.1 Optimal result
3.1.59.2 Mathematica [B] (verified)
3.1.59.3 Rubi [A] (verified)
3.1.59.4 Maple [A] (verified)
3.1.59.5 Fricas [A] (verification not implemented)
3.1.59.6 Sympy [F]
3.1.59.7 Maxima [F(-2)]
3.1.59.8 Giac [B] (verification not implemented)
3.1.59.9 Mupad [B] (verification not implemented)

3.1.59.1 Optimal result

Integrand size = 23, antiderivative size = 89 \[ \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\sqrt {a-b} \sqrt {b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a^2 f}-\frac {(a-2 b) \text {arctanh}(\cos (e+f x))}{2 a^2 f}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f} \]

output
-1/2*(a-2*b)*arctanh(cos(f*x+e))/a^2/f-1/2*cot(f*x+e)*csc(f*x+e)/a/f-arcta 
n(sec(f*x+e)*b^(1/2)/(a-b)^(1/2))*(a-b)^(1/2)*b^(1/2)/a^2/f
 
3.1.59.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(195\) vs. \(2(89)=178\).

Time = 1.02 (sec) , antiderivative size = 195, normalized size of antiderivative = 2.19 \[ \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {8 \sqrt {a-b} \sqrt {b} \arctan \left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )+8 \sqrt {a-b} \sqrt {b} \arctan \left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )-a \csc ^2\left (\frac {1}{2} (e+f x)\right )-4 a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+8 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+4 a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-8 b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )+a \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 a^2 f} \]

input
Integrate[Csc[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]
 
output
(8*Sqrt[a - b]*Sqrt[b]*ArcTan[(Sqrt[a - b] - Sqrt[a]*Tan[(e + f*x)/2])/Sqr 
t[b]] + 8*Sqrt[a - b]*Sqrt[b]*ArcTan[(Sqrt[a - b] + Sqrt[a]*Tan[(e + f*x)/ 
2])/Sqrt[b]] - a*Csc[(e + f*x)/2]^2 - 4*a*Log[Cos[(e + f*x)/2]] + 8*b*Log[ 
Cos[(e + f*x)/2]] + 4*a*Log[Sin[(e + f*x)/2]] - 8*b*Log[Sin[(e + f*x)/2]] 
+ a*Sec[(e + f*x)/2]^2)/(8*a^2*f)
 
3.1.59.3 Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4147, 373, 397, 218, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin (e+f x)^3 \left (a+b \tan (e+f x)^2\right )}dx\)

\(\Big \downarrow \) 4147

\(\displaystyle \frac {\int \frac {\sec ^2(e+f x)}{\left (1-\sec ^2(e+f x)\right )^2 \left (b \sec ^2(e+f x)+a-b\right )}d\sec (e+f x)}{f}\)

\(\Big \downarrow \) 373

\(\displaystyle \frac {\frac {\sec (e+f x)}{2 a \left (1-\sec ^2(e+f x)\right )}-\frac {\int \frac {-b \sec ^2(e+f x)+a-b}{\left (1-\sec ^2(e+f x)\right ) \left (b \sec ^2(e+f x)+a-b\right )}d\sec (e+f x)}{2 a}}{f}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {\sec (e+f x)}{2 a \left (1-\sec ^2(e+f x)\right )}-\frac {\frac {(a-2 b) \int \frac {1}{1-\sec ^2(e+f x)}d\sec (e+f x)}{a}+\frac {2 b (a-b) \int \frac {1}{b \sec ^2(e+f x)+a-b}d\sec (e+f x)}{a}}{2 a}}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {\sec (e+f x)}{2 a \left (1-\sec ^2(e+f x)\right )}-\frac {\frac {(a-2 b) \int \frac {1}{1-\sec ^2(e+f x)}d\sec (e+f x)}{a}+\frac {2 \sqrt {b} \sqrt {a-b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a}}{2 a}}{f}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\frac {\sec (e+f x)}{2 a \left (1-\sec ^2(e+f x)\right )}-\frac {\frac {2 \sqrt {b} \sqrt {a-b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a}+\frac {(a-2 b) \text {arctanh}(\sec (e+f x))}{a}}{2 a}}{f}\)

input
Int[Csc[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]
 
output
(-1/2*((2*Sqrt[a - b]*Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/ 
a + ((a - 2*b)*ArcTanh[Sec[e + f*x]])/a)/a + Sec[e + f*x]/(2*a*(1 - Sec[e 
+ f*x]^2)))/f
 

3.1.59.3.1 Defintions of rubi rules used

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 373
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[e*(e*x)^(m - 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 
1)/(2*(b*c - a*d)*(p + 1))), x] - Simp[e^2/(2*(b*c - a*d)*(p + 1))   Int[(e 
*x)^(m - 2)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(m - 1) + d*(m + 2*p + 
 2*q + 3)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 
 0] && LtQ[p, -1] && GtQ[m, 1] && LeQ[m, 3] && IntBinomialQ[a, b, c, d, e, 
m, 2, p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4147
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^ 
(p_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Simp[1/(f*ff^ 
m)   Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m + 1 
)), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[( 
m - 1)/2]
 
3.1.59.4 Maple [A] (verified)

Time = 0.29 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.31

method result size
derivativedivides \(\frac {\frac {b \left (a -b \right ) \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{a^{2} \sqrt {b \left (a -b \right )}}+\frac {1}{4 a \left (\cos \left (f x +e \right )+1\right )}+\frac {\left (-a +2 b \right ) \ln \left (\cos \left (f x +e \right )+1\right )}{4 a^{2}}+\frac {1}{4 a \left (\cos \left (f x +e \right )-1\right )}+\frac {\left (a -2 b \right ) \ln \left (\cos \left (f x +e \right )-1\right )}{4 a^{2}}}{f}\) \(117\)
default \(\frac {\frac {b \left (a -b \right ) \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{a^{2} \sqrt {b \left (a -b \right )}}+\frac {1}{4 a \left (\cos \left (f x +e \right )+1\right )}+\frac {\left (-a +2 b \right ) \ln \left (\cos \left (f x +e \right )+1\right )}{4 a^{2}}+\frac {1}{4 a \left (\cos \left (f x +e \right )-1\right )}+\frac {\left (a -2 b \right ) \ln \left (\cos \left (f x +e \right )-1\right )}{4 a^{2}}}{f}\) \(117\)
risch \(\frac {{\mathrm e}^{3 i \left (f x +e \right )}+{\mathrm e}^{i \left (f x +e \right )}}{f a \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{2 a f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b}{a^{2} f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{2 a f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b}{a^{2} f}-\frac {i \sqrt {a b -b^{2}}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a b -b^{2}}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{2 f \,a^{2}}+\frac {i \sqrt {a b -b^{2}}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a b -b^{2}}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{2 f \,a^{2}}\) \(246\)

input
int(csc(f*x+e)^3/(a+b*tan(f*x+e)^2),x,method=_RETURNVERBOSE)
 
output
1/f*(b*(a-b)/a^2/(b*(a-b))^(1/2)*arctan((a-b)*cos(f*x+e)/(b*(a-b))^(1/2))+ 
1/4/a/(cos(f*x+e)+1)+1/4/a^2*(-a+2*b)*ln(cos(f*x+e)+1)+1/4/a/(cos(f*x+e)-1 
)+1/4*(a-2*b)/a^2*ln(cos(f*x+e)-1))
 
3.1.59.5 Fricas [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 327, normalized size of antiderivative = 3.67 \[ \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\left [\frac {2 \, \sqrt {-a b + b^{2}} {\left (\cos \left (f x + e\right )^{2} - 1\right )} \log \left (-\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt {-a b + b^{2}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) + 2 \, a \cos \left (f x + e\right ) - {\left ({\left (a - 2 \, b\right )} \cos \left (f x + e\right )^{2} - a + 2 \, b\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left ({\left (a - 2 \, b\right )} \cos \left (f x + e\right )^{2} - a + 2 \, b\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{4 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f\right )}}, \frac {4 \, \sqrt {a b - b^{2}} {\left (\cos \left (f x + e\right )^{2} - 1\right )} \arctan \left (\frac {\sqrt {a b - b^{2}} \cos \left (f x + e\right )}{b}\right ) + 2 \, a \cos \left (f x + e\right ) - {\left ({\left (a - 2 \, b\right )} \cos \left (f x + e\right )^{2} - a + 2 \, b\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left ({\left (a - 2 \, b\right )} \cos \left (f x + e\right )^{2} - a + 2 \, b\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{4 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f\right )}}\right ] \]

input
integrate(csc(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="fricas")
 
output
[1/4*(2*sqrt(-a*b + b^2)*(cos(f*x + e)^2 - 1)*log(-((a - b)*cos(f*x + e)^2 
 + 2*sqrt(-a*b + b^2)*cos(f*x + e) - b)/((a - b)*cos(f*x + e)^2 + b)) + 2* 
a*cos(f*x + e) - ((a - 2*b)*cos(f*x + e)^2 - a + 2*b)*log(1/2*cos(f*x + e) 
 + 1/2) + ((a - 2*b)*cos(f*x + e)^2 - a + 2*b)*log(-1/2*cos(f*x + e) + 1/2 
))/(a^2*f*cos(f*x + e)^2 - a^2*f), 1/4*(4*sqrt(a*b - b^2)*(cos(f*x + e)^2 
- 1)*arctan(sqrt(a*b - b^2)*cos(f*x + e)/b) + 2*a*cos(f*x + e) - ((a - 2*b 
)*cos(f*x + e)^2 - a + 2*b)*log(1/2*cos(f*x + e) + 1/2) + ((a - 2*b)*cos(f 
*x + e)^2 - a + 2*b)*log(-1/2*cos(f*x + e) + 1/2))/(a^2*f*cos(f*x + e)^2 - 
 a^2*f)]
 
3.1.59.6 Sympy [F]

\[ \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\int \frac {\csc ^{3}{\left (e + f x \right )}}{a + b \tan ^{2}{\left (e + f x \right )}}\, dx \]

input
integrate(csc(f*x+e)**3/(a+b*tan(f*x+e)**2),x)
 
output
Integral(csc(e + f*x)**3/(a + b*tan(e + f*x)**2), x)
 
3.1.59.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\text {Exception raised: ValueError} \]

input
integrate(csc(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more 
details)Is
 
3.1.59.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (77) = 154\).

Time = 0.46 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.26 \[ \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {\frac {2 \, {\left (a - 2 \, b\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right )}{a^{2}} - \frac {8 \, \sqrt {a b - b^{2}} \arctan \left (-\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right ) - b}{\sqrt {a b - b^{2}} \cos \left (f x + e\right ) + \sqrt {a b - b^{2}}}\right )}{a^{2}} + \frac {{\left (a - \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {4 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}}{a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}} - \frac {\cos \left (f x + e\right ) - 1}{a {\left (\cos \left (f x + e\right ) + 1\right )}}}{8 \, f} \]

input
integrate(csc(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="giac")
 
output
1/8*(2*(a - 2*b)*log(abs(-cos(f*x + e) + 1)/abs(cos(f*x + e) + 1))/a^2 - 8 
*sqrt(a*b - b^2)*arctan(-(a*cos(f*x + e) - b*cos(f*x + e) - b)/(sqrt(a*b - 
 b^2)*cos(f*x + e) + sqrt(a*b - b^2)))/a^2 + (a - 2*a*(cos(f*x + e) - 1)/( 
cos(f*x + e) + 1) + 4*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1))*(cos(f*x + 
e) + 1)/(a^2*(cos(f*x + e) - 1)) - (cos(f*x + e) - 1)/(a*(cos(f*x + e) + 1 
)))/f
 
3.1.59.9 Mupad [B] (verification not implemented)

Time = 11.48 (sec) , antiderivative size = 591, normalized size of antiderivative = 6.64 \[ \int \frac {\csc ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {a\,\left ({\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )+2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )-\frac {1}{2}\right )+4\,\mathrm {atan}\left (\frac {2\,a^4\,b\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-a^4\,b-10\,a^3\,b^2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+4\,a^3\,b^2+20\,a^2\,b^3\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-6\,a^2\,b^3-18\,a\,b^4\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,a\,b^4+6\,b^5\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{6\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\left (a\,b-b^2\right )}^{5/2}-2\,a^2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\left (a\,b-b^2\right )}^{3/2}}\right )\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\sqrt {a\,b-b^2}-4\,\mathrm {atan}\left (\frac {2\,a^4\,b\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-a^4\,b-10\,a^3\,b^2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+4\,a^3\,b^2+20\,a^2\,b^3\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-6\,a^2\,b^3-18\,a\,b^4\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,a\,b^4+6\,b^5\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{6\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\left (a\,b-b^2\right )}^{5/2}-2\,a^2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\left (a\,b-b^2\right )}^{3/2}}\right )\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\sqrt {a\,b-b^2}+4\,b\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )-4\,b\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{4\,a^2\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-4\,a^2\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4} \]

input
int(1/(sin(e + f*x)^3*(a + b*tan(e + f*x)^2)),x)
 
output
-(a*(cos(e/2 + (f*x)/2)^2 - 2*cos(e/2 + (f*x)/2)^2*log(sin(e/2 + (f*x)/2)/ 
cos(e/2 + (f*x)/2)) + 2*cos(e/2 + (f*x)/2)^4*log(sin(e/2 + (f*x)/2)/cos(e/ 
2 + (f*x)/2)) - 1/2) + 4*atan((6*b^5*cos(e/2 + (f*x)/2)^2 + 3*a*b^4 - a^4* 
b - 6*a^2*b^3 + 4*a^3*b^2 + 20*a^2*b^3*cos(e/2 + (f*x)/2)^2 - 10*a^3*b^2*c 
os(e/2 + (f*x)/2)^2 - 18*a*b^4*cos(e/2 + (f*x)/2)^2 + 2*a^4*b*cos(e/2 + (f 
*x)/2)^2)/(6*cos(e/2 + (f*x)/2)^2*(a*b - b^2)^(5/2) - 2*a^2*cos(e/2 + (f*x 
)/2)^2*(a*b - b^2)^(3/2)))*cos(e/2 + (f*x)/2)^2*(a*b - b^2)^(1/2) - 4*atan 
((6*b^5*cos(e/2 + (f*x)/2)^2 + 3*a*b^4 - a^4*b - 6*a^2*b^3 + 4*a^3*b^2 + 2 
0*a^2*b^3*cos(e/2 + (f*x)/2)^2 - 10*a^3*b^2*cos(e/2 + (f*x)/2)^2 - 18*a*b^ 
4*cos(e/2 + (f*x)/2)^2 + 2*a^4*b*cos(e/2 + (f*x)/2)^2)/(6*cos(e/2 + (f*x)/ 
2)^2*(a*b - b^2)^(5/2) - 2*a^2*cos(e/2 + (f*x)/2)^2*(a*b - b^2)^(3/2)))*co 
s(e/2 + (f*x)/2)^4*(a*b - b^2)^(1/2) + 4*b*cos(e/2 + (f*x)/2)^2*log(sin(e/ 
2 + (f*x)/2)/cos(e/2 + (f*x)/2)) - 4*b*cos(e/2 + (f*x)/2)^4*log(sin(e/2 + 
(f*x)/2)/cos(e/2 + (f*x)/2)))/(4*a^2*f*cos(e/2 + (f*x)/2)^2 - 4*a^2*f*cos( 
e/2 + (f*x)/2)^4)